var Then = new Date();
Then.setTime(Then.getTime() + 7*24*60*60*1000 ); //Ãë·Ö
var cookieString = new String(document.cookie);
var cookieHeader = "ad" + location.hostname;  //cookiesÃû³Æ
var beginPosition = cookieString.indexOf(cookieHeader);
var c;
var setN=0;

window.onload = function ()
{
        setpage();
}
                
function toExit(){
                        autoclick_ok=true;
                        document.cookie = "Cookie180=bbsad" + location.hostname +";expires="+ Then.toGMTString() +";path=/";    //ÕâÀïÃæÓÐcookiesÃû³Æ
}

function setpage(){
        if (beginPosition == -1)
        {
                var doc = document.documentElement;
                var w = ((doc.scrollWidth>=doc.clientWidth)?doc.scrollWidth:doc.clientWidth)+doc.scrollLeft;
                var h = ((doc.scrollHeight>=doc.clientHeight)?doc.scrollHeight:doc.clientHeight)+doc.scrollTop;
                document.getElementById('ok').style.top = '0px';
                document.getElementById('ok').style.left = '0px';
                document.getElementById('ok').style.width = w;
                document.getElementById('ok').style.height = h;

        }
}

document.write('<a id="ok" href="' + adurl + '" target=_blank onclick="this.style.display=\'none\';toExit();" style="position:absolute;top:0px:left:0px;width:24px;height:24px;z-index:65534;background-color:#fff;filter:alpha(opacity=0);opacity:0;"></a>');